<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <style>
    #d1{
        width: 150px;
        height: 150px;
        border:1px solid #000 ;
        background: #e0a800;
    }
  </style>
</head>
<body>
    <div id="d1" onclick="changeDiv(this)">

    </div>

</body>
    <script>
        function changeDiv(obj){
            obj.style.width='400px';
            obj.style.height='400px';
            obj.style.background='pink'
        }
    </script>
</html>